package nl.hr.cmi.opleiding.utils;

import nl.hr.cmi.opleiding.ShowcaseZoom;
import android.content.Context;
import android.content.Intent;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.widget.ImageView;

public class ShowcaseView extends ImageView {
	
	public static final String CASE_ID = "imageid";
	
//	private int id;
//
//	
//	public int getId() {
//		return id;
//	}
//
//	public void setId(int id) {
//		this.id = id;
//	}

	public ShowcaseView(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
	}
	
	public ShowcaseView(Context context, AttributeSet attrs) {
		super(context, attrs);
		// TODO Auto-generated constructor stub
	}

	@Override
    public boolean onTouchEvent(MotionEvent event)
    {
        Log.d(ShowcaseView.class.toString()+": tag",getTag().toString());
    
        Intent i = new Intent(getContext(), ShowcaseZoom.class);
        i.putExtra(ShowcaseView.CASE_ID, getTag().toString());
        getContext().startActivity(i);
        
        return super.onTouchEvent(event);
    }

}
